package com.twu.biblioteca;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class BibliotecaApp {

    public static void main(String[] args) {

        IOManager ioManager = new IOManager(System.out, new BufferedReader(new InputStreamReader(System.in)));

        List<LibraryBook> bookList = new ArrayList<LibraryBook>();
        bookList.add(new LibraryBook("The Wizard of Oz"));
        Library library = new Library(bookList);

        Map<String, LibraryAction> options = new HashMap<String, LibraryAction>();

        LibraryAction bookLister = new BookLister(library, ioManager);
        LibraryAction checkOuter = new CheckOuter(library, ioManager);

        options.put("1",bookLister);
        options.put("2",checkOuter);

        new Biblioteca(ioManager, "Welcome to Biblioteca!", library, options).run();

    }
}
